 <!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>后台管理系统</title>
	    <meta name="author" content="BaiYY"/>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	    <meta name="renderer" content="webkit">
	    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/bootstrap.min.css"/>
	    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/Font/css/font-awesome.min.css"/>
	    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/index.css"/>
	    <script type="text/javascript" src="__PUBLIC__/admin/js/jquery.js"></script>
	    <script type="text/javascript" src="__PUBLIC__/admin/js/bootstrap.min.js"></script>
	    <script type="text/javascript" src="__PUBLIC__/admin/js/index.js"></script>
	</head>
	<body>
		
		<!--右边侧栏开始-->
		<div class="right-sidebar" style="max-width: 1200px;">
			<ul class="nav nav-tabs" style="margin-bottom: 16px" role="tablist" id="listTab">
				<li role="presentation" class="active"><a href="contentNotice.html">{:L(GAME_SETTING_NOTICE)}</a></li>
				<li role="presentation" id="contactd"><a href="contentContact.html">{:L(GAME_SETTING_CONTACT)}</a></li>
				<li role="presentation" id="messaged"><a href="contentMessage.html">{:L(GAME_SETTING_MESSAGE)}</a></li>
				<li role="presentation" id="msgpushd"><a href="msgPush.html">{:L(GAME_MSGPUSH)}</a></li>
			</ul>
		
			<div class="row">
				<div class="col-md-6">
					<div class="input-group">
						<textarea class="form-control" rows="10" cols="70" name="ccontent" id="ccontent">{$content}</textarea>
					</div>
					<div class="alert alert-danger hide" role="alert" id="content-tips"></div>
					<p></p>
		
					<button type="submit" class="btn btn-primary center-block" id="submit">提交</button>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			$(function () {
                var contactd = $.trim($("#contactd").text());
                var messaged = $.trim($("#messaged").text());
                var msgpushd = $.trim($("#msgpushd").text());

                if(contactd == '' || contactd == 'GAME_SETTING_CONTACT') {
                    $("#contactd").hide();
                }

                if(messaged == '' || messaged == 'GAME_SETTING_MESSAGE') {
                    $("#messaged").hide();
                }

                if(msgpushd == '' || msgpushd == 'GAME_MSGPUSH') {
                    $("#msgpushd").hide();
                }
            })
			$("#submit").on("click",function(){
				var ccontent = $.trim($("#ccontent").val());
				var url="{:U('Admin/Main/contentNoticeSave')}";
				$.ajax({
					type:"post",
					url:url,
					dataType:"json",
					data:{"content":ccontent},
					success:function(data) {
						if(data == 'success') {
							alert("修改成功！");
							window.location.href="{:U('Admin/Main/contentNotice')}";
						} else {
							alert('修改失败！');
						}
					}
				});
			});
		</script>
	</body>
</html>
